//
//  VideoAudioStyleCell.swift
//  NDAi
//
//  Created by 丸子 on 2024/6/21.
//

import UIKit

class VideoAudioStyleCell: UITableViewCell {

     lazy var backView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor(hexString: "#FFFFFF", transparency: 0.10)
        view.allRound(8)
        return view
    }()
    
    lazy var iconIV: UIImageView = {
        let imageView = UIImageView()
        imageView.image = UIImage(named: "icon_login_a")
        imageView.contentMode = .scaleToFill
        imageView.clipsToBounds = true
        return imageView
    }()
    
    lazy var sgLb: UILabel = {
        let label = UILabel()
        label.textColor = .white
        label.font = UIFont.pingFangSCRegular(ofSize: 14)
        label.textAlignment = .center
        label.text = "啊洗吧"
        return label
    }()
    
     lazy var selectIV: UIImageView = {
        let imageView = UIImageView()
        imageView.image = UIImage(named: "icon_video_audioSel")
        imageView.contentMode = .scaleToFill
        imageView.clipsToBounds = true
        return imageView
    }()
    
    lazy var playlb:UILabel = {
        let label = UILabel()
        label.textColor = .white
        label.font = UIFont.pingFangSCRegular(ofSize: 12)
        label.textAlignment = .center
        label.text = "正在播放中..."
        return label
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        backgroundColor = .clear
        selectionStyle = .none
        contentView.addSubviews([backView])
        backView.addSubviews([iconIV, sgLb, selectIV, playlb])
        
        backView.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(10)
            make.leading.trailing.equalToSuperview().inset(16)
            make.height.equalTo(56)
        }
        
        iconIV.snp.makeConstraints { make in
            make.leading.equalToSuperview().offset(12)
            make.centerY.equalToSuperview()
            make.width.height.equalTo(34)
        }
        
        sgLb.snp.makeConstraints { make in
            make.leading.equalTo(iconIV.snp.trailing).offset(10)
            make.centerY.equalToSuperview()
        }
        
        selectIV.snp.makeConstraints { make in
            make.trailing.equalToSuperview().offset(-15)
            make.centerY.equalToSuperview()
        }
        
        playlb.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.trailing.equalTo(selectIV.snp.leading).offset(-10)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
